import Vue from 'vue'
import Router from 'vue-router'
import App from '@/App.vue'
import ElementUI from 'element-ui'
import Login from '@/pages/Login/index.vue'
import Home from '@/pages/Home/index.vue'
import Register from '@/pages/Register/index.vue'
import Search from '@/pages/Search/index.vue'

Vue.use(Router)
Vue.use(ElementUI)

export default new Router({
	routes: [
		{
			path:'*',
			redirect:'/home'
		},
		{
			path: '/login',
			name: 'Login',
			component: Login,
			meta:{show:false}
		},
		{
			path: '/home',
			name: 'Home',
			component: Home,
			meta:{show:true}
		},
		{
			path: '/register',
			name: 'Register',
			component: Register,
			meta:{show:false}
		},
		{
			path: '/search:keywords',
			name: 'Search',
			component: Search,
			meta:{show:true}
		}
	]
})
